<template>
  <div>
    <van-tabbar
      v-model="active"
      :route="true"
      @change="changeFn"
      :placeholder="true"
    >
      <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
      <van-tabbar-item icon="label" to="/zhuanti">专题</van-tabbar-item>
      <van-tabbar-item icon="search" to="/fenlei">分类</van-tabbar-item>
      <van-tabbar-item icon="friends-o" to="/car"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item icon="setting-o" to="/my">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: "Dibu",
  data() {
    return {
      active: 0,
    };
  },
  methods: {
    changeFn(active) {
      this.active = active;
      // console.log('111',this.active);
    },
  },
};
</script>

<style scope>
</style>